<template>
	<view>
		<u-navbar title-color="#333" title-bold title-size="36" title="认证" :border-bottom="false"></u-navbar>
		<image  v-if="check_status==2" class="sq-s" src="../../static/img/lawyerVersion/sq-s1.png" mode=""></image>
		<image  v-if="check_status==3" class="sq-s" src="../../static/img/lawyerVersion/sq-s2.png" mode=""></image>
		<!-- 审核中审核中审核中审核中审核中 -->
		<view class="" v-if="check_status==2">
			<view class="sq-ti">
				审核中
			</view>
			<view class="sq-jj">
				预计需要1～3个工作日，请耐心等待
			</view>
		</view>
		
		<!-- 失败失败失败失败失败失败 -->
		<view class=""  v-if="check_status==3">
			<view class="sq-ti">
				审核失败
			</view>
			<view class="sq-jj">
				请调整审核信息
			</view>
		</view>
		
		<!-- 成功成功成功成功成功成功 -->
		<u-popup v-model="wcshow" mode="center" border-radius="32">
			<view class="popupmd text_center">
				<image class="sq-s3" src="../../static/img/lawyerVersion/sq-s3.png" mode=""></image>
				<view class="">
					<view class="u-font-40 font_weight">
						申请成功
					</view>
					<view class="font_14_999 u-m-t-28">
						设置在线状态及在线时间
					</view>
				</view>
				<view class="p-bd u-m-t-50 flex flex_cen">
					<view class="p-btn2" @click="$u.throttle(wanshan, 1000)">
						去设置
					</view>
				</view>
			</view>
		</u-popup>
		
		<!-- 失败失败失败失败失败失败 -->
		<view v-if="check_status==3" style="width: 100%;height: 170rpx;"></view>
		<view class="btn-bo"  v-if="check_status==3">
			<button class="btn_login_btn" @click="submit">
				修改信息
			</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				wcshow:false,
				check_status:'',
				type:''
			}
		},
		onLoad() {
			this.getInfo()
			// this.type = e.type
			// this.check_status = e.check_status
			// console.log(this.check_status)
			// if(this.check_status==1){ // status 正常用户  1通过 2审核中 3拒绝
			// 	this.wcshow = true
				
			// 	console.log(this.wcshow)
			// }
		},
		methods: {
			//个人信息
			getInfo() {
				this.$api({
					url: '/getUserInfo',
					method: 'get',
					data: {
						token:uni.getStorageSync("token")
					},
				}).then(res => {
					console.log(res)
					if (res.code == 1) {
						this.check_status = res.data.status
						if(this.check_status==1){ // status 正常用户  1通过 2审核中 3拒绝
							// this.wcshow = true
							uni.reLaunch({
								url:"/subPackageA/pages/lawyerVersion/index/index"
							})
						}
					}
				})
			},
			wanshan(){
				uni.reLaunch({
					url:"/subPackageA/pages/lawyerVersion/mine/mine"
				})
			},
			submit(){
				uni.navigateTo({
					url:"/pages/mine/renzheng"
				})
				// if(this.type==1){
				// 	uni.navigateTo({
				// 		url:"/pages/mine/renzhengLvshi?type=2"
				// 	})
				// }
				// if(this.type==2){
				// 	uni.navigateTo({
				// 		url:"/pages/mine/renzhengFaxuesheng?type=2"
				// 	})
				// }
			}
		}
	}
</script>

<style scoped lang="scss">
	.sq-s3{
		width: 260rpx;
		height: 260rpx;
		margin: 0 auto;
	}
	.sq-s{
		width: 470rpx;
		height: 470rpx;
		margin: 60rpx auto;
	}
	.sq-ti{
		font-weight: bold;
		font-size: 56rpx;
		color: #000000;
		text-align: center;
	}
	.sq-jj{
		font-size: 32rpx;
		color: #999999;
		margin-top: 24rpx;
		text-align: center;
	}
	.popupmd{
		width: 554rpx;
		// height: 566rpx;
		background: #FFFFFF;
		border-radius: 32rpx 32rpx 32rpx 32rpx;
		padding: 24rpx 24rpx 68rpx 24rpx;
		
		
		.p-bd{
			font-size: 28rpx;
			line-height: 64rpx;
			text-align: center;
			
			.p-btn2{
				width: 508rpx;
				height: 64rpx;
				background: linear-gradient( 180deg, #FA2D2D 0%, #F40000 100%);
				border-radius: 46rpx 46rpx 46rpx 46rpx;
				color: #FFFFFF;
			}
		}
		
		
	}
	
	.btn-bo {
		width: 750rpx;
		height: 120rpx;
		background: #FFFFFF;
		box-shadow: 0rpx -2rpx 8rpx 2rpx rgba(0, 0, 0, 0.14);
		padding-top: 14rpx;
		position: fixed;
		bottom: 0;
		left: 0;
		z-index: 9;
	
		.btn_login_btn {
			width: 686rpx;
			height: 90rpx;
			background: linear-gradient(180deg, #FA2D2D 0%, #F40000 100%);
			border-radius: 46rpx 46rpx 46rpx 46rpx;
			// margin-top: 116rpx;
			font-size: 36rpx;
			color: #fff;
			line-height: 90rpx;
			margin-left: 32rpx;
			text-align: center;
			font-weight: bold;
		}
	}
</style>
